package JavaCode;

/**
 * @Author Kechelle
 * @Date 2020/9/14 0:07
 * @Version 1.0
 */
public class Solution {
    public static void main(String[] args) {
        int helper = helper(-5 ,9);
        System.out.println(helper);
    }
    static int helper(int a,int b){
        int sum= 0;
        while (a!=b){
            int x = a&1;
            int y = b&1;
            if(x!=y){
                sum++;
            }
            a = a>>>1;
            b = b>>>1;
        }
        return sum;
    }
}
